
//- This source code is licensed under the terms of the
//- GNU Affero General Public License found in the LICENSE file in
//- the root directory of this source tree.
//-
//- Copyright (c) 2021-present Kaleidos INC

button.track-button.like-button(
    title="{{ 'PROJECT.LIKE_BUTTON.BUTTON_TITLE' | translate }}"
    ng-click="vm.toggleLike()"
    ng-class="{'active':vm.project.get('is_fan'), 'is-hover':vm.project.get('is_fan') && vm.isMouseOver}"
    ng-mouseover="vm.showTextWhenMouseIsOver()"
    ng-mouseleave="vm.showTextWhenMouseIsLeave()"
)
    span.track-inner
        span.track-icon
            tg-svg(svg-icon="icon-like")
        span(
            ng-if="!vm.project.get('is_fan')"
            translate="PROJECT.LIKE_BUTTON.LIKE"
        )
        span(
            ng-if="vm.project.get('is_fan') && !vm.isMouseOver"
            translate="PROJECT.LIKE_BUTTON.LIKED"
        )
        span(
            ng-if="vm.project.get('is_fan') && vm.isMouseOver"
            translate="PROJECT.LIKE_BUTTON.UNLIKE"
        )
    span.track-button-counter(
        title="{{ 'PROJECT.LIKE_BUTTON.COUNTER_TITLE'|translate:{total:vm.project.get(\"total_fans\")||0}:'messageformat' }}",
        tg-loading="vm.loading"
    ) {{ vm.project.get('total_fans') }}
